package com.peas.platform.module.icims.base.auth.adapter.repository.po;

import java.util.*;
import java.math.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

// 权限
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_permission`")
public class PermissionPo extends BasePo {

    //权限类型
    //0:菜单、1:按钮、2:输入组件、3：数据列
    @Size(max = 20, message = "权限类型不能超过20个字符")
    @TableField(value = "`permission_type`", jdbcType = JdbcType.VARCHAR)
    private String permissionType;

    //权限编码
    @Size(max = 50, message = "权限编码不能超过50个字符")
    @TableField(value = "`permission_code`", jdbcType = JdbcType.VARCHAR)
    private String permissionCode;

    //权限名称
    @Size(max = 200, message = "权限名称不能超过200个字符")
    @TableField(value = "`permission_name`", jdbcType = JdbcType.VARCHAR)
    private String permissionName;

    //状态
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    //链接
    @Size(max = 200, message = "链接不能超过200个字符")
    @TableField(value = "`url`", jdbcType = JdbcType.VARCHAR)
    private String url;

    //上级权限ID
    //（权限表）外键
    @TableField(value = "`parent_id`", jdbcType = JdbcType.BIGINT)
    private Long parentId;

}
